<?php
class ListMaterialExpenseAction extends CAction {
	public function run() {
		$userId = AccessControl::getCurrentUser()->id;
		$criteria = new CDbCriteria();
		$criteria->compare('createUserId', $userId);
		$criteria->order = 'expenseDate DESC';
		$dataProvider = new CActiveDataProvider('MaterialExpense',
			array(
				'criteria' => $criteria
			));
		$this->getController()
			->render('listExpense',
				array(
					'dataProvider' => $dataProvider,
				));
	}
}
